﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Workbench.Models;
using Workbench.Operations;

namespace WorkbenchTests.Operations
{
    [TestClass]
    public class ExportOperationsTests
    {
        [TestMethod]
        public async Task ExportOperationsTests_ExportAggregatedWords()
        {
            var models = new List<AggregatedWordModel>()
            {
                new AggregatedWordModel() { WordContent = "добре", BaseForms = new HashSet<string>() { "добър, добро" }, Freq = 5 },
                new AggregatedWordModel() { WordContent = "а", BaseForms = new HashSet<string>() { "а" }, Freq = 3 },
            };

            var filePath = Path.ChangeExtension(Path.GetTempFileName(), "csv");
            await WordListOperations.ExportCSV(filePath, models);
            //var x = 5;
        }
    }
}
